package com.mb.app.service.impl;

import com.mb.app.service.IReportInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * @author
 * @create 2019-04-25 9:10 PM
 **/

@Component
@Order(value = 500)
@Slf4j
public class AdminStartupRunner implements CommandLineRunner {
    @Autowired
    private IReportInfoService reeportInfoService;

    @Override
    public void run(String... strings) throws Exception {
        log.info("AdminStartupRunner .....");


        //reeportInfoService.channelPvUvService();

        RunnableTask task = new RunnableTask();
        task.setReeportInfoService(reeportInfoService);
        Thread thread = new Thread(task);
        thread.start();


        log.info("Thread started ...");
    }
}
